%Daten laden
X = load('perceptrondata');
y1 = load('perceptrontarget1');
y2 = load('perceptrontarget2');


%Konvertieren 
X = X';
y1(y1==0)=-1;
y2(y2==0)=-1;

%Training 1. Set
[w1,i1] = perco(X,y1,1000);

subplot(1,2,1);

plotData(X,y1);
plotLineFromWeight(w1);
axis([0 1 0 1]);
title('Training Set 1');

% %Training 2. Set
[w2,i2] = perco(X,y2,1000);

subplot(1,2,2);
plotData(X,y2);
plotLineFromWeight(w2);
axis([0 1 0 1]);
title('Training Set 2');

